<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'b.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
	<h1>Struts2 标签</h1>
	<!-- 1.内置样式（默认xhtml；设置theme="simple"，去掉样式）；2.自动回显（栈中的属性） -->
	<s:form action="Demo2Action" namespace="/tag">
		<s:textfield name="name" label="用户名"></s:textfield>
		<s:password name="password" label="密码"></s:password>
		<s:radio list="{'男','女'}" name="gender" label="性别"></s:radio>
		<s:radio list="#{1:'男',2:'女'}" name="gender2" label="性别"></s:radio>
		<s:checkboxlist list="#{1:'抽烟',2:'喝酒',3:'烫头'}" name="hobby" label="爱好"></s:checkboxlist>
		<s:select list="#{1:'大专',2:'本科',3:'硕士'}" headerKey="" headerValue="--请选择--" name="edu" label="学历"></s:select>
		<s:file name="photo" label="照片"></s:file>
		<s:textarea name="desc" label="简介"></s:textarea>
		<s:submit value="提交"></s:submit>
		<!-- 错误标签 -->
		<s:actionerror/>
	</s:form>
  </body>
</html>
